﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Drawing;

namespace RSEngine.Helper
{
    static class ColorHelper
    {
        /// <summary>
        /// Returns the color luminence.
        /// </summary>
        /// <param name="color"></param>
        /// <returns></returns>
        static public double Luminance(Color color)
        {
            return (0.2989f * color.R) + (0.5866f * color.G) + (0.1145f * color.B);
        }
    }
}
